<template>
<uni-shadow-root class="partials-price_group-index"><view class="price_group_block">
    
    
  
  <text class="price_group_price" v-if="item.promotion>0">￥{{item.promotionPrice}}</text>
  <text class="price_group_price" v-else>￥{{item.price}}</text>
  <text class="price_group_price" v-if="item.maxPrice>item.price">-{{item.maxPrice}}</text>
  <text v-if="item.unitShow" class="price_group_unitShow">/{{item.unitShow}}</text>
  <text v-if="item.maxPrice<=item.price&&item.tagPrice>item.price" class="price_group_tag_price">￥{{item.tagPrice}}</text>
  
</view></uni-shadow-root>
</template>

<script>

global['__wxRoute'] = 'partials/price_group/index'
const app = getApp();
Component({
  properties: {
    data: {
      type: JSON,
    }
  },
  data: {
    item: {},
    color:'#888',
    tipText:"",
    count:152366544,
    setting:null,
    defaultColor:'',
    secondColor:''
  },
  
   ready:function(){
     let that=this;
     console.log("component-price-group",that.data.data)
     that.setData({
       item: that.data.data,
       defaultColor: app.globalData.setting.platformSetting.defaultColor,
       secondColor: app.globalData.setting.platformSetting.secondColor,
       setting: app.globalData.setting
     })
   },
  methods: {
    tolinkUrl: function (event) {
      console.log(event.currentTarget.dataset.link)
      app.globalData.linkEvent(event.currentTarget.dataset.link);

    }
  },
})
export default global['__wxComponents']['partials/price_group/index']
</script>
<style platform="mp-weixin">
.price_group_block{
  display: flex;
  flex-direction: row;
  align-items:baseline;
}
.price_group_unitShow {
  color:#bbb;
  font-size:24rpx;
  margin-left:4rpx;
  letter-spacing:4rpx;
}
.price_group_price {
  color:#ff826e;
  font-size:32rpx;
}
.price_group_tag_price {
  text-decoration:line-through;
  font-size:24rpx;
  color:#bbb;
  margin-left:6rpx;
}
</style>